package com.easy.service.impl;

import com.easy.bean.Employees;
import com.easy.dao.IEmployeesDao;
import com.easy.service.IEmployees;
import com.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeesImpl implements IEmployees {

    @Autowired
    IEmployeesDao dao;

    public Employees getEmployees(int id){
        return dao.getEmployees(id);
    }

    //删除
    @Override
    public int delEmployees(int id){
        int count=dao.delEmployees(id);
        return count;
    }

    //修改
    public int editEmployees(Employees employees){
        int count=dao.editEmployees(employees);
        return count;
    }

    @Override
    public List<Employees> getSearchEmployees(Employees employees, Page page) {
        return dao.getSearchEmployees(employees,page);
    }

    public int getCount(Employees employees){
        return dao.getCount(employees);
    }

    @Override
    public List<Employees> getEmployeesAndUSer() {
        return dao.getEmployeesAndUSer();
    }

}
